<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <!-- 如果没写小括号  默认是事件对象 -->
        <button @click="fn">按我</button>
        <!-- undefined  因为这边没穿实参 -->
        <button @click="fn()">按我</button>
        <!-- 10，传实参是多少就是多少 -->
        <button @click="fn(10)">按我</button>
        <!-- 10,20 -->
        <button @click="fn(10,20)">按我</button>
        <!-- $event就是事件对象 ，对应哪个形参那个就是事件对象 -->
        <button @click="fn(10,$event)">按我</button>

    </div>
    <script src="./vue.js"></script>
    <script>
        new Vue({
            el: "#app",
            data() {
                return {
                    msg: "",
                }
            },
            methods: {
                fn(e, n) {
                    console.log(e, n);
                }
            }
        })
    </script>
</body>

</html>